import 'package:json_annotation/json_annotation.dart';

part 'gcov_response.g.dart';

@JsonSerializable()
class GcovResponse extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'msg')
  String msg;

  @JsonKey(name: 'newslist')
  List<Newslist> newslist;

  GcovResponse(this.code,this.msg,this.newslist,);

  factory GcovResponse.fromJson(Map<String, dynamic> srcJson) => _$GcovResponseFromJson(srcJson);

  Map<String, dynamic> toJson() => _$GcovResponseToJson(this);

}


@JsonSerializable()
class Newslist extends Object {

  @JsonKey(name: 'continents')
  String continents;

  @JsonKey(name: 'provinceName')
  String provinceName;

  @JsonKey(name: 'currentConfirmedCount')
  int currentConfirmedCount;

  @JsonKey(name: 'confirmedCount')
  int confirmedCount;

  @JsonKey(name: 'curedCount')
  int curedCount;

  @JsonKey(name: 'deadCount')
  int deadCount;

  @JsonKey(name: 'deadRate')
  String deadRate;

  Newslist(this.continents,this.provinceName,this.currentConfirmedCount,this.confirmedCount,this.curedCount,this.deadCount,this.deadRate);

  factory Newslist.fromJson(Map<String, dynamic> srcJson) => _$NewslistFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NewslistToJson(this);

}


